import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// 编程式跳转使用this.$router.push()
export default new Router({
    routes: [{
            path: '/',
            name: 'index',
            redirect: '/mainPage'
        },
        {
            path: '/mainPage',
            name: '1',
            component: (resolve) => {
                require(['@/components/pages/mainPage'], resolve)
            },
            meta: {
                title: '报表页面'
            }
        }
    ],
    // 定义激活路由的样式
    linkActiveClass: 'active'
})
